//
//  MediaInfo.h
//  DLNADemo
//
//  Created by apple on 14-12-18.
//  Copyright (c) 2014年 skyworth.digital. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DmsWrapper.h"
#import "DOUAudioFile.h"


//dms param  objectclass
#define OBJECT_CLASS_IMAGE_TYPE1 @"object.item.imageItem"
#define OBJECT_CLASS_IMAGE_TYPE2 @"object.item.imageItem.photo"
#define OBJECT_CLASS_VIDEO_TYPE1 @"object.item.videoItem"
#define OBJECT_CLASS_VIDEO_TYPE2 @"object.item.videoItem.movie"
#define OBJECT_CLASS_AUDIO_TYPE1 @"object.item.audioItem"
#define OBJECT_CLASS_AUDIO_TYPE2 @"object.item.audioItem.musicTrack"
#define OBJECT_CLASS_EPGITEM_TYPE1 @"object.item.epgItem"
#define OBJECT_CLASS_EPGITEM_TYPE2 @"object.item.epgItem.videoProgram"
#define OBJECT_CLASS_VIDEOITEM_DIRECTTV   @"object.item.videoItem.directTV"
#define OBJECTCLASS_VIDEOID_PVR @"object.item.videoItem.videoBroadcast"

//dms param  criteria
#define SEARCH_IMAGE_CRITERIA @"upnp:class derivedfrom \"object.item.imageItem\""
#define SEARCH_VIDEO_CRITERIA @"upnp:class derivedfrom \"object.item.videoItem\""
 #define SEARCH_AUDIO_CRITERIA @"upnp:class derivedfrom \"object.item.audioItem\""
 #define SEARCH_DIRECTTV_CRITERIA @"upnp:class derivedfrom \"object.item.videoItem.directTV\""
 #define SEARCH_PVR_CRITERIA @"upnp:class derivedfrom \"object.item.videoItem.videoBroadcast\""


//media play state
#define MEDIA_STATE_NO_MEDIA_PRESENT @"NO_MEDIA_PRESENT"
#define MEDIA_STATE_PLAYING          @"PLAYING"
#define MEDIA_STATE_PAUSED_PLAYBACK  @"PAUSED_PLAYBACK"
#define MEDIA_STATE_STOPPED          @"STOPPED"
#define MEDIA_STATE_TRANSITIONING    @"TRANSITIONING"
#define MEDIA_STATE_LOADING    @"LOADING"


@interface EpgObjct : NSObject

@property (copy,nonatomic)NSString *programTitle;
@property (copy,nonatomic)NSString *channelID;
@property (copy,nonatomic)NSString *channelName;
@property (copy,nonatomic)NSString *scheduledStartTime;
@property (copy,nonatomic)NSString *scheduledEndTime;
@property (copy,nonatomic)NSString *descriptionInfo;
@property (nonatomic)BOOL appointPlay;
@property (nonatomic)BOOL appointRecord;
@end


@interface MediaItem : NSObject<DOUAudioFile>

@property (copy,nonatomic) NSString *name;
@property (copy,nonatomic) NSString *url;
@property (strong,nonatomic) UIImage *thumbnail;
@property (strong,nonatomic) UIImage *image;
@property (nonatomic) MediaType mediaType;

@property (strong,nonatomic) NSURL *ipodMusicUrl;
@property (strong,nonatomic) NSURL *imageAssetUrl;

@property (nonatomic) NSInteger itemID;

@property (copy,nonatomic) NSString *objectID;
@property (copy,nonatomic) NSString *albumUrl;
@property (copy,nonatomic) NSString *date;
@property (copy,nonatomic) NSString *thumbnailUrl;
@property (copy,nonatomic) NSString *objectClass;
@property (copy,nonatomic) NSString *artist;
@property (copy,nonatomic) NSString *duration;
@property (copy,nonatomic) NSString *size;
@property (copy,nonatomic) NSString *title;
@property (copy,nonatomic)NSString *descriptionInfo;
@property (copy,nonatomic) NSString *extension;

@property (strong,nonatomic) EpgObjct *epg;


-(NSString*)getChannelID;

@end
